import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { HttpModule,JsonpModule ,Http} from '@angular/http';
import { ReactiveFormsModule } from '@angular/forms';
import { TranslateModule, TranslateLoader, TranslateStaticLoader  } from 'ng2-translate';

import { AppComponent } from './app.component';
import { appRoutes } from './app.routes';
import { PostModule } from './post/post.module';
import { UserModule } from './user/user.module';
import { FormsModule }   from '@angular/forms';

export function createTranslateLoader(http: Http) {
    return new TranslateStaticLoader(http, '/assets/i18n', '.json');
}

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    FormsModule,
    UserModule,
    BrowserModule,
    RouterModule.forRoot(appRoutes),
    PostModule,
    HttpModule,
    JsonpModule,
    BrowserAnimationsModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
